package jenry.activity;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class Gan_Activity_04_second extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
    	
    	System.out.println("SecondActivity --->onCreate");
        super.onCreate(savedInstanceState);
        setContentView(R.layout.second);
        
        Button mySecond=(Button)findViewById(R.id.mySecond);
        mySecond.setText(R.string.secondTOfirst);
        mySecond.setOnClickListener(new mySecondListent());
    }
    
    class mySecondListent implements OnClickListener{
    	
    	public void onClick(View v) {
			
			Intent intent = new Intent();
			intent.setClass(Gan_Activity_04_second.this,Gan_Activity_04_first.class);
			
			Gan_Activity_04_second.this.startActivity(intent);
		}
    	
    }
    
    @Override
	protected void onDestroy() {
		System.out.println("SecondAcvity --->onDestroy");
		super.onDestroy();
	}

	@Override
	protected void onPause() {
		System.out.println("SecondAcvity --->onPause");
		super.onPause();
	}

	@Override
	protected void onRestart() {
		System.out.println("SecondAcvity --->onRestart");
		super.onRestart();
	}

	@Override
	protected void onResume() {
		System.out.println("SecondAcvity --->onResume");
		super.onResume();
	}

	@Override
	protected void onStart() {
		System.out.println("SecondAcvity --->onStart");
		super.onStart();
	}

	@Override
	protected void onStop() {
		System.out.println("SecondAcvity --->onStop");
		super.onStop();
	}
}